Optimize¶

Optimize functionality lets the user perform budget optimization to get the maximum possible target for the desired budget. It displays the summary metrics and output of the budget optimization process comparing budget and target allocation across various dimensions which took part in optimization.

Input for Optimize Functionality¶

  • Seasonality Effects: Based on user selection for seasonality effects in the Predict functionality, seasonality effects will be included while performing budget optimization.

  • Number of Days/Date Range:
    • The user can enter the number of days (for non-seasonality selection) or date range (for seasonality selection) based on seasonality effect selection on the Predict tab.
    • The optimizer will provide output for the number of days/date range the user selects.
    • For seasonality selection, while selecting the date range user should include the month(s) and days of the week for which they want to run the optimizer.
      • Note:  For seasonality selection, the result will vary based on the date range selected, considering the seasonality effect for the days of the week and month(s) selected.

  • Selecting/Unselecting Dimensions:
    • The user can select/unselect any dimension(s) to include/exclude it from the optimization process.
      • Note:  This feature is a substitute for the discard option on the predict tab. Unlike, discarded dimension(s), these unselected dimensions can't be allocated any budget as part of the budget optimization plan.

  • Minimum and Maximum for Budget:
    • The user has the option to add constraints on the budget for each dimension.
    • Constraints can be included in both the minimum or maximum value of the budget.
    • These constraints can added in terms of median or mean historic values based on user selection on the predict tab.
    • If constraints are not provided, then default values will be considered for optimization.
    • Constraint can either be provided in numeric form or percentage form and the user can choose between both the input options using a toggle available in the input panel. The default values for constraints are:
      • Numeric Value: Maximum: 3 x Median/Mean Spend of dimension, Minimum: 0
      • Percentage: Maximum: 200% of Median/Mean Spend of dimension, Minimum: -100% of Median/Mean Spend of dimension (i.e., 0)
    • The user can only provide constraints between the minimum and maximum values only, inclusive of both.
    • If impressions is selected in the explore module, then along with the constraints CPM input option is also provided for each dimension. By default, historic CPM values are displayed but the user has the option to update it for any dimension(s) if required. If the CPM value is not updated the default values are considered by the optimizer.
      • Note:  While entering the constraints few pointers should be kept in mind:
        • Minimum value can't be greater than maximum value and vice versa.
        • Minimum and maximum values can't be equal to each other.

  • Budget for optimization:
    • The budget for which optimization needs to be performed will be entered here.
    • The budget range will be displayed in the input box once the user has provided the inputs for the number of days/date range and constraints. The user needs to provide a budget choosing between the range displayed.
    • The budget range that is displayed is for n number of days as entered by the user.
      • Note:  If the user fails to provide input in the mentioned range, a notification will be displayed to update the budget input entered by the user.

  • Discarded Dimension:
    • There are some dimensions discarded by the application in the predict module but the user still wants to allocate a certain budget to them, in such cases this functionality can be utilized.
    • In the input panel just before the budget input box there is a plus icon, if the user clicks that list of discarded dimensions will be displayed (if any). The user can then enter the desired budget for these dimensions.
      • Note:
        • This is an optional input that users can provide if they want to allocate a certain budget to such dimensions.
        • The user has the option to provide the budget to certain dimensions only from the available list of discarded dimensions. The rest of the dimensions in the discarded list will not be allocated to any budget.
        • The budget range input will include the budget allocated to these discarded dimensions.

  • Group Dimension Constraint:
    • This is an optional field, and will only be available to users if more than one dimension is selected and the group dimension option/checkbox is selected on the explore tab.
    • This feature allows users to restrict the budget at group-level dimensions.
    • If the option is enabled, this feature can be utilized using a plus icon on the optimize tab. On clicking the icon, a separate panel on the right is displayed on the optimize tab, where group-level constraints can be set. By default, maximum values for each group level dimension are displayed based on the list of sub-dimensions within it.
      • Note:
        • Group level dimension is decided based on the option selected on explore tab. Any dimension can be selected as group level dimension among the multiple dimensions selected in the select dimension field.
        • Range for each group level dimension can be seen on hover in the panel itself.
        • The sub-dimension(s) within each group level dimension(s), can be selected/unselected as part of that group constraint. In case a sub-dimension(s), is unselected then it is not treated as part of any group-level dimension during the optimization process.

Screenshot%20%281%29.jpeg

Screenshot%20%282%29.jpeg

Screenshot%20%283%29.jpeg

Results from Optimizer Functionality¶

Summary Metrics and CPA/ROI Chart¶

  • Summary Metrics table containing results of the optimization at a high level:
    • Total Budget: It is the overall budget for optimization entered by the user.
    • Target: It is the aggregated target recommended by the optimizer for the entered budget.
    • CPA or ROI: It is the CPA or ROI for the optimization plan based on the target type selection.
    • Confidence Score: It is the precision score for optimization calculated based on each dimension's response curve accuracy (computed through SMAPE i.e. 1-SMAPE) and optimized budget allocation%.
  • Chart comparing CPA or ROI (based on the target type selection) is for median/mean (based on user selection) historic spend and optimization plan.

Screenshot%20%28152%29.png

Optimization Plan¶

  • This includes the budget allocated to each dimension and their respective target.
  • The result includes budget and target at per day and for n number of days as selected by the user in the input panel.
  • Median/mean (based on user selection) budget based on historic data is also displayed for users to compare budget allocation.
  • Percentage allocation for total historic budget, median/mean (based on user selection) historic budget, optimized budget, and the target both at optimized and median/mean historic budget level is also displayed to understand their distribution across dimensions.
  • If the budget for discarded dimension (if any) is included, then their median/mean (based on user selection) and budget entered by the user for these respective dimensions are also displayed as part of the output. Their budget percentage allocation (total, median/mean and budget entered by the user) is also included in the result. As these dimensions are discarded there will be no information on their target allocation.
  • Following is the list of variables included in the result for the optimization plan:
    • Original Median Budget/Day: Median budget based on historic data per day
    • Recommended Budget/Day: Budget allocation to each dimension by the optimizer per day
    • Original Total Budget Allocation %: Percentage allocation for total budget for each dimension based on historic spend data
    • Original Median/Mean Budget Allocation %: Percentage allocation for median/mean (based on user selection) budget for each dimension based on historic spend data
    • Recommended Budget Allocation %: Percentage allocation for optimized budget for each dimension
    • Recommended Total Budget Allocation: Budget allocation to each dimension by the optimizer for n number of days
    • Target/Day: Target for each dimension based on budget allocation by the optimizer per day
    • Overall Target: Target for each dimension based on budget allocation by the optimizer for n days
    • % of Target: Percentage allocation for the target for each dimension
    • Target at Original Median/Mean Budget Allocation %: Target for each dimension based on the Original Median/Mean Budget Allocation %. For calculation budget entered by the user (for optimization) is considered and then dimension level allocation is calculated using Original Median/Mean Budget Allocation %. Finally, based on the dimension level budget their respective target is computed

Screenshot%20%284%29.jpeg

Charts comparing the percentage distribution for Budget and Target Allocation¶

  • Charts compare the percentage distribution of budget and target allocation for different dimensions.
  • Budget Allocation Chart compares:
    • Original Median/Mean Budget Allocation %: Percentage allocation for median/mean (based on user selection) budget for each dimension based on historic spend data
    • Recommended Budget Allocation %: Percentage allocation for optimized budget for each dimension
  • Target Allocation Chart compares:
    • % of Target: Percentage allocation for the target for each dimension
    • % of Target at Original Median/Mean Budget Allocation %: Percentage allocation for the target for each dimension based on the Original Median/Mean Budget Allocation %

Screenshot%20%28155%29.png

Note on results from Optimizer Functionality¶

  • 'Initial Plan', 'Target at Original Median/Mean Budget Allocation %' and 'Target Allocation Original' available under 'CPA/ROI comparison chart', 'Optimization Plan' and 'Target Projections chart' respectively are based on the historic median or mean (based on user selection) spend distribution, so no constraint given by the user for optimization applies to them. Due to this 'Initial Plan' and 'Target at Original Median/Mean Budget Allocation %' could be lower and greater respectively than the recommendation in a few cases.
  • The user can download the optimization plan and configurations used for optimization in the optimize tab.
    • The optimization plan download option is available towards the end on the optimize page.
    • Configuration download option is available below the submit button on the left panel on the optimize page.

Note on discarding the dimension(s) to get optimum result in Optimize Functionality¶

  • For some dimensions flat response curves will be displayed in the visualization on Predict tab. This is due to a bad fit to the data which is leading to flat curves.
  • The flat curves when used in the Optimize functionality tend to result in suboptimal outputs.
  • The recommendation is to either discard these curves during the visual inspection, unselect these dimensions in the input panel on optimize tab or enter the minimum budget possible for these dimensions in the input panel on optimize tab.

Backend Logic¶

  • Budget: This is the budget entered by the user in the front end in the left-hand panel. This budget is for n number of days (for non-seasonality) and date range (for seasonality) as selected by the user.

  • Budget per day: The total budget is divided by n number of days as optimization run for per day budget only and later computed for the total number of days. In the case of non-seasonality, the number of days is entered by the user, and in seasonality, the number of days is calculated based on the date range.

  • Model Equation Used: Equation to capture the nonlinear response to media variable on the dependent variable using S Curve (Hill). In optimizer, this equation is utilized to get the corresponding conversions for a dimension based on its parameters and investment.
    • Equation for Non-Seasonal Model: c * X^a / ( X^a + b^a )
    • Equation for Seasonal Model: ( c * X^a / ( X^a + b^a ) ) + week_coeff + month_coeff
    • Model parameters and their bounds:
      • X: Level of Exposure (Investment/Impression)
      • a: Shape parameter
      • b: Inflection parameter
      • c: Max/Saturation parameter
      • week_coeff: Weekly seasonality parameter, for each day of the week (only applicable for the model with seasonality)
      • month_coeff: Annual seasonality parameter, for each month of the year (only applicable for the model with seasonality)

  • Optimization Process: Optimization works based on the incremental budget technique, comparing across different dimensions and then allocating it to the dimension which produces the highest number of targets or conversions in that iteration. The same process happens for multiple iterations till the entire budget entered by the user is exhausted. Targets or conversions for a particular dimension are computed based on its response curve. Below is the step-by-step process followed for optimization:
    • Filter for Selected Dimensions: Only dimensions selected in the front end in the input panel are filtered for the optimization process.
    • Maximum Bounds Check: All the dimensions are checked for the target at maximum bounds. If the maximum target for a particular dimension can be achieved at a lower budget than the maximum bound then the maximum bound for that dimension is adjusted. This is done to provide budget capping to such dimensions.
    • Incremental Budget Calculation: Incremental budget for each iteration is calculated for the optimization process. 50% of the median or mean (based on user selection) budget of the dimension having the minimum value is considered as the incremental budget.
    • Check for Group Dimension (optional): This is only checked if the user has selected for group dimension option in the front end in the explore tab. Here, maximum possible bounds and a list of sub-dimensions within a group dimension are pre-processed.
    • Inital Budget and Target Allocation: In cases where the minimum bound for dimensions entered by the user is not zero, the initial budget and respective target are allocated to these dimensions before the optimization process. This process is performed to make sure that minimum bounds entered by the user are allocated.
    • Incremental Budget Allocation: Various processes take place here while allocating the budget for optimization:
      • Budget Allocation: Each dimension is allocated an incremental budget, and their respective target obtained is compared. The dimension with the highest target among all the dimensions is allocated the incremental budget. This process continues for several iterations until the budget entered by the user for optimization is achieved.
      • Check for Dimensions:
        • There are a few dimensions having response curves that are convex in nature (i.e. curves having slow beginning), due to which it sometimes gets stuck in the local minima during the budget allocation process (as during the beginning of the response curves, the targets for such dimensions is very low as compared to other dimensions) and thus, less budget is allocated to them. Such dimensions are identified before the optimization process starts (under pre-processing section).
        • The required budget (i.e. a budget more than its threshold so that it is able to participate in the optimization process) is allocated to them if necessary during the optimization process (here, threshold means an investment point on the response curve post which investment to predictions ratio has become comparatively higher for such dimensions or the response curve is not convex anymore).
      • Allocate Remaining Budget: In the scenario where the maximum possible overall target is achieved, but the budget entered by the user is not achieved (i.e. still some proportion of the budget is remaining to be allocated), then the remaining budget is distributed across the participating dimensions based on optimized budget allocation.
      • Note:
        • While allocating the budget at each iteration, dimension level and group level (if available) are taken into consideration and the budget allocation is restricted within the bounds/constraints.
        • In case of impressions, response curves are computed based on impressions and target. And, the optimization process takes place based on the same instead of response curve based on investment and target.

  • Confidence Score: The score for optimization is calculated based on each dimension's response curve accuracy and optimized budget allocation% based on the following logic:
    • Accuracy: Calculating accuracy using the error metric for each dimension SMAPE (i.e. Accuracy = 1-SMAPE)
    • Budget Allocated over Maximum: The percentage recommended budget allocated over each dimension's maximum historic value
    • Accuracy with Penalty Score: Penalty factor of 20% is considered for budget allocation over each dimension's maximum historical spend. This penalty is applied by multiplying this factor with Budget Allocated over Maximum% and then subtracting it from the Accuracy.
    • Confidence Score: The final confidence score is then calculated by the weighted average of the adjusted Accuracy using Optimized Budget Allocation%.

  • Result: Optimize budget and target for respective dimensions are obtained from the optimization process and then transformations are performed. Here, discarded dimensions are included in the optimization plan and the budget entered by the user in the front end to these dimensions is allocated. Various other variables mentioned under Results from Optimizer Functionality section for summary metrics, optimization plan and charts are calculated.
    • Assumption:
      • Budget is evenly distributed across each day for the selected number of days.
      • Budget is going to exhaust even if it leads to saturation in conversion.

image-2.png